import Vue from 'vue'
import App from './App.vue'
import router from './router'


import ElementUi from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUi)


import axios from 'axios'


Vue.prototype.$axios = axios
axios.defaults.baseURL = "http://127.0.0.1:8080"
// axios.defaults.baseURL = "https://39.107.71.254:8443"
axios.interceptors.request.use(config=>{
  let token = window.sessionStorage.getItem('token')
  if(token){
    config.headers.token = token
  }
  return config
})

Vue.use(router)

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
